﻿<UserControl x:Class="BulkRenamer.App.WPF.Controls.CheckButton"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" HorizontalAlignment="Stretch" 
             d:DesignHeight="23" d:DesignWidth="150">

    <Button HorizontalAlignment="Stretch" VerticalAlignment="Center" 
            HorizontalContentAlignment="Center" VerticalContentAlignment="Center" 
            Content="abcd">
        <Button.Style>
            <Style TargetType="Button">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="Button">
                            <Grid HorizontalAlignment="Stretch">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition />
                                </Grid.ColumnDefinitions>

                                <CheckBox Margin="5" />
                                <TextBlock Grid.Column="1" Margin="5" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Text="{TemplateBinding Content}" TextAlignment="Center" />
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </Button.Style>
    </Button>
</UserControl>
